import { defineStore } from 'pinia';

export interface PathConfigState {
  frontstageHomePath: string;
  backstageHomePath: string;
  personalCenterPath: string;
}

export const usePathConfigStore = defineStore('pathConfig', {
  state: (): PathConfigState => ({
    /*
     * 前台首页路径
     *   前台登录后默认跳转的路径
     **/
    frontstageHomePath: '/front/view',
    /*
     * 后台首页路径
     *   点击后台网站名时跳转到的路径
     *   标签页删除完后，默认跳转到的路径
     **/
    backstageHomePath: '/course/manage',
    /*
     * 个人中心路径
     *   点击个人身份名称时跳转到的路径
     **/
    personalCenterPath: '/front/personal',
  }),
  getters: {
    getFrontstageHomePath: (state) => state.frontstageHomePath,
    getBackstageHomePath: (state) => state.backstageHomePath,
    getPersonalCenterPath: (state) => state.personalCenterPath,
  },
});